package org.neurone.session;

import javax.servlet.http.HttpSession;

public class SessionServerMock implements SessionServer {
	private String key;
	private String userId;
	private String sessionKey;
	
	public SessionServerMock()
	{}
	
	public SessionServerMock(String key, String userId, String sessionKey)
	{
		this.key = key;
		this.userId = userId;
		this.sessionKey = sessionKey;
	}
	
	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public HttpSession getSession() {
		return null;
	}

	@Override
	public String getSessionID() {
		return "testid";
	}

	@Override
	public String getSessionKey() {
		return this.sessionKey;
	}

	@Override
	public String getSessionUserID() {
		return this.userId;
	}

	@Override
	public void logoutSession() {
		this.key = null;
		this.userId = null;
		this.sessionKey = null;
	}

	@Override
	public void registerSession(String key, String userID) {
		this.key = key;
		this.userId = userID;
	}

	@Override
	public void registerSessionKey(String sessionKey) {
		this.sessionKey = sessionKey;
	}

}
